#pragma once
#include "UIOption.h"

using namespace DuiLib;

#ifndef TIPTOS
#define TIPTOS
#define TIPLEFTIMAGELEFTPOS 29
#define TIPIMAGEWIDTH  5
#define TIPTEXTLEFTPOS  (TIPLEFTIMAGELEFTPOS + TIPIMAGEWIDTH)
#define TIPTOP	6
#define TIPBOTTOM 18
#endif

class UILIB_API CMenuOptionUI : public COptionUI
{
public:
	CMenuOptionUI(void);
	virtual ~CMenuOptionUI(void);
	virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
	virtual void PaintStatusImage(HDC hDC);
	virtual bool ShouldDrowForeImage();
	virtual void DoEvent(TEventUI& event);
	void SetSelectedArrowImage( LPCTSTR pstrValue );
	LPCTSTR GetClass() const;
	void SetSelectedForeImage( LPCTSTR pstrValue );

	void SetTipImage(LPCTSTR pstrValue );
	void SetTipLeftImage(LPCTSTR pstrValue );
	void SetTipCenterImage(LPCTSTR pstrValue );
	void SetTipRightImage(LPCTSTR pstrValue );
	void SetTipText(LPCTSTR pstrValue );
	void SetTipTextFont(int iFont);
	void SetTipTextCorlor(DWORD dwValue);

	void PaintTip(HDC hDC);
	void PaintTip2(HDC hDC);
	void ShowTip2(BOOL bShowTip);
	void PaintText(HDC hDC);
	

protected:
	CDuiString		m_sSelectedArrowImage;
	CDuiString		m_sSelectedForeImage;
	CDuiString		m_sTipCenterImage;
	CDuiString		m_sTipRightImage;
	CDuiString		m_sTipLeftImage;
	CDuiString		m_sTipImage;
	CDuiString		m_sTipText;

	int				m_iTipTextFont;
	DWORD			m_dwTipTextColor;
	bool			m_bCombie;
	BOOL			m_bShowTip;

	bool			m_bLButtonPressed;
	bool			m_bDragStart;
	POINT			m_ptMosueDown;
};
